# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=jack_utils
pkgver=0.0.1
pkgrel=2
pkgdesc="Useful command line programs for JACK"
arch=(loong64 x86_64)
url="https://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html"
license=(GPL2)
groups=(pro-audio)
depends=(glibc jack)
source=(https://kokkinizita.linuxaudio.org/linuxaudio/downloads/$pkgname-$pkgver.tar.bz2)
sha512sums=('599c53ea07d6cf760357583c00489a361adc8894a7b6baff9e58676b0be2295650822e52457b882bab85a89b90adb9a876ddd63d1e3785ec35ec66ac24f472f8')
b2sums=('4f04f8b74212f3861bb3a9247ef24f04bda012671bb3ddebcc390cafc15ac199db908f66c4ee3145161cfbbd5201a16d66b38c2135eacc2b6fac17e7b9c2ad88')

prepare() {
  # remove -march=native
  sed -e '/native/d' -i $pkgname-$pkgver/source/Makefile
}

build() {
  make -C $pkgname-$pkgver/source
}

package() {
  make PREFIX=/usr DESTDIR="$pkgdir/" install -C $pkgname-$pkgver/source
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
